<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link href="${webInfo.logoImg}" rel="icon">
    <title>${webInfo.title}</title>
    <% include("./common/css.html"){} %>
</head>

<body class="layui-layout-body">

<div class="layui-layout layui-layout-admin">
    <!-- 头部 -->
    <% include("./layout/header.html"){} %>
    <!-- 侧边栏 -->
    <% include("./layout/side.html"){} %>

    <!-- 主体部分 -->
    <div class="layui-body"></div>

    <!-- 底部 -->
    <% include("./layout/footer.html"){} %>
</div>

<!-- js部分 -->
<% include("./common/js.html"){} %>
<script>
    layui.use(['layer', 'element', 'index', 'admin', 'contextMenu'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var index = layui.index;
        var admin = layui.admin;
        var contextMenu = layui.contextMenu;

        var items = [
            {
                icon: 'layui-icon layui-icon-rate',
                name: '加入收藏',
                click: function (ele, ori_ele) {
                    layer.msg('点击了' + this.name + "菜单ID：" + ori_ele.currentTarget.getAttribute("menuId"))
                }
            }
        ];


        contextMenu.bind('.ctxMenuDiv', items);

        // 默认加载主页
        index.loadHome({
            menuPath: 'console',
            menuName: '<i class="layui-icon layui-icon-home"></i>'
        });

        $.get("/system/user/checkPwd",function(data){
            if(data.code===200 && data.data){
                admin.open({
                    title: '请重置原始密码',
                    type: 2,
                    shade: .07,
                    closeBtn: 0,
                    area: ['440px', '480px'],
                    content: "/tpl/password"
                });
            }
        });

    });
</script>
</body>

</html>